package com.gimi.cloud.bbp.app.consumer.feign;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.gimi.cloud.bbp.dto.user.UserDTO;

import feign.Headers;

/**
 * Created by shazhiwei on 2017/10/17.
 */
@FeignClient(name = "bbp-app-service")
public interface RegisterFeignService {
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/checkPhoneAvailable", method = RequestMethod.POST)
    String checkPhoneAvailable(@RequestBody String phone);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/doRegister", method = RequestMethod.POST)
    String doRegister(@RequestBody UserDTO userDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/doLoginByPassword", method = RequestMethod.POST)
    String doLoginByPassword(@RequestBody UserDTO userDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/refreshToken", method = RequestMethod.POST)
    String refreshToken(@RequestBody UserDTO userDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/getResetPwdCode", method = RequestMethod.POST)
    String getResetPwdCode(@RequestBody UserDTO userDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/doLoginByPwdCode", method = RequestMethod.POST)
    String doLoginByPwdCode(@RequestBody UserDTO userDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/resetPwd", method = RequestMethod.POST)
    String resetPwd(@RequestBody UserDTO userDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/modifyPwd", method = RequestMethod.POST)
    String modifyPwd(@RequestBody UserDTO userDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/unreadMsg", method = RequestMethod.POST)
    String unreadMsg(@RequestBody Long userId);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/wx/register", method = RequestMethod.POST)
    String weChatRegister(@RequestBody Long userId);

    /**
     * 获取初始化密码的验证码验证
     * @param userDTO
     * @return
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/doInitPassword", method = RequestMethod.POST)
    String doInitPassword(UserDTO userDTO);

    /**
     * 初始化密码
     * @param userDTO
     * @return
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/initPassword", method = RequestMethod.POST)
    String initPassword(UserDTO userDTO);
    
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/register/checkModifypassword", method = RequestMethod.POST)
    String checkModifypassword(UserDTO userDTO);
}
